const { usersModel } = require('../../../../node-project/dao/models/usersModel.js');

module.exports.login = async function(data) {
	const isLogin = await usersModel.find({username: data.username, password: data.password})
	return isLogin;
}

module.exports.isRegister = async function(data) {
	const isFind = await usersModel.findOne({username: data.username, password: data.password})
	return isFind;
}

module.exports.register = async function(data) {
	const  register = await usersModel.create({username: data.username, password: data.password});
	return register;
}

